package com.jhws.core.push;

import java.io.IOException;
import java.util.Properties;

import org.springframework.core.io.ClassPathResource;

/**
 * 个推配置类
 *
 * @author xiaokek
 * @since 2015年10月10日 下午11:50:55
 */
public enum PushConfig {
	PUSH_CONFIG;
	
	public final String appId;
	public final String appKey;
	public final String appSecret;
	public final String master;
	public final String host;
	public final String appHost;
	
	private PushConfig(){
		Properties p = new Properties();
		try{
			p.load(new ClassPathResource("getui.properties").getInputStream());
		} catch(IOException e){
			e.printStackTrace();
		}
		
		this.appId = p.getProperty("appId");
		this.appKey = p.getProperty("appKey");
		this.appSecret = p.getProperty("appSecret");
		this.master = p.getProperty("master");
		this.host = p.getProperty("host");
		this.appHost = p.getProperty("appHost");
	}

}
